{% extends 'blog/base.html' %}

{% block head %}
  <title>这是我的博客首页</title>
{% endblock head %}

{% block content %}
{% if article_list %}
{% for article in article_list %}
<div class="box is-shadowless is-radiusless">
    <h1 class=" is-size-5 has-text-weight-bold"><a href="{% url 'blog:article' article.id %}">{{ article.title }}</a> </h1> 
    <p class="has-text-grey-light is-size-7" style="margin:1em 0;">
      <span>作者：<a href="">{{ article.author }}</a> </span>&nbsp;
      <span>分类：<a href="{% url 'blog:category' article.category.slug %}" target="_blank" rel="noopener noreferrer">{{ article.category }}</a> </span>&nbsp;
      <span>发布时间：{{ article.add_date }} </span>
    </p>
    <div class="content">
      {{ article.desc }}...

      <a href="{% url 'blog:article' article.id %}" class="button is-pulled-right is-primary" style="margin-top: 1em">阅读更多</a>
      <div class=" is-clearfix"></div>
    </div> 
</div>
{% endfor %}
{% else %}
  <p>还没有发布任何文章！</p>
{% endif %}
{% endblock content %}
